home *** CD-ROM | disk | FTP | other *** search
- *****************************************************************************
- ** A Print to STDOUT routine thats not very amazing but will save you the **
- ** use of the crappy CLI type command. In this case of the program the **
- ** open shell window at the beginning of the intro is STDOUT. This **
- ** makes things easier so we don't have to open our own screens **
- ** and all the bollocks involved in doing this sort of code **
- ** in 68000. Have fun and I hope this source is useful. **
- ** SEE YOU IN A FUTURE POWERTEK PRODUCTION - SLADE **
- *****************************************************************************
-
- ;Written in Devpac to use System includes then written in Asm_one
- ;without the use of system includes.
-
- LINKLIB MACRO ; The full linklab macro as
- move.l a6,-(a7) ; explained in the assembler tutorial.
- move.l \2,a6 ; you should know what`s going on
- jsr \1(a6) ; If you need and help then write to
- move.l (a7)+,a6 ; me at the normal address. (SLADE)
- ENDM
-
-
- CALLSYS MACRO
- LINKLIB _LVO\1,\2
- ENDM
-
-
- CR EQU 10 ; to jump to a new line.
- _AbsExecBase EQU 4
- _LVOOpenLibrary EQU -552
- _LVOCloseLibrary EQU -414
- _LVOOutput EQU -60
- _LVOWrite EQU -48
-
-
- start lea dos_lib,a1 ;load lib name in a1
- moveq #0,d0 ;Needed version number.
-
- Openlib CALLSYS OpenLibrary,_AbsExecBase ;Open lib at
- move.l d0,_DOSBase ;execbase!
- beq exit ;DID IT OPEN?
-
-
- Dos_open CALLSYS Output,_DOSBase ;get handle
- move.l d0,_stdout ;store it
- beq close_dos ;check if it`s valid
-
-
- write_text move.l _stdout,d1
- move.l #TEXT,d2 ;start of TEXT
- move.l #TEXTSIZE,d3 ;TEXT length
- CALLSYS Write,_DOSBase
-
-
-
- Close_dos move.l _DOSBase,a1 ;Duh!!
- CALLSYS CloseLibrary,_AbsExecBase ;Close the lib
-
-
-
- Exit move 00,d0
- rts
-
-
- ;Constants
-
- _DOSBase ds.l 1
- _STDOUT ds.l 1
- DOS_LIB dc.b 'dos.library',0
-
-
- TEXT
- dc.b " _______________ __ ",CR
- dc.b " z-----/ ___________ /--/ /--------------------------------------------",CR
- dc.b " Y----/ /--__--__--/ /--/ /---__-__------__-__-__-__--------------------",CR
- dc.b " L---/ /__/ /-/ /-/ /__/ /---/_//-//-/-//_-/_/-/-/_-/_/-----------------",CR
- dc.b " A--/ //___/-/ /-/ // __/---/--/_//_/_//_-/-\-/-/_-/-\--P-R-E-S-E-N-T-Z-",CR
- dc.b " X-/ /------/ /-/ /-\ \--------------------------------------------_____",CR
- dc.b " !/_/------/_/-/_/---\_\------------------------------------------/-_ -/",CR
- dc.b " _______ _______ __ __ _______ _______ _______ / // / ",CR
- dc.b " \______\\______\\_\ \_\\______\\______\\______\ / // / ",CR
- dc.b " / /__/ // /____ / /_/ // / / // / / // / / / __ __ __ / //_/___",CR
- dc.b " / //_ // //___//___ // / / // / / // / / / //_ /_ / //_ /________ ",CR
- dc.b " / /__/ // /____ ____/ // /__/ // / / // /__/ / /__/__//_//_ / / ",CR
- dc.b "/_//___//_//___//_____//______//_/ /_//_//___/ /_/____ ",CR
- dc.b " _____ _____ _____ °__/_ /// ",CR
- dc.b " |||||||||||||||| / / / / / / / / ",CR
- dc.b " -++RELEASED++ON++- /____ /____/ / / / / ____ /------ ",CR
- dc.b " -++++**/**/**++++- / / / / / / / / ",CR
- dc.b " |||||||||||||||| _____/ / / / / / / /______ ",CR
-
-
- TEXTSIZE EQU *-TEXT
-
- VERSION: dc.b 0,"$VER:(C) SLADE/PTK (6/3/96). A Print-To-STDOUT Routine.",0